{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{:config('tuchuang.site_title')}</title>
<meta name="keywords" content="{:config('tuchuang.site_keywords')}" />
<meta name="description" content="{:config('tuchuang.site_description')}"  />
{/block}
<!--main -->
{block name="main"}
<div class="container pt-5">
    <h2 class="text-center mt-5 mb-3">{:config('tuchuang.site_name')}</h2>
    <h6 class="text-center mb-3">{volist name=":config('common.site_applys')" id="apply"}
    <a class="text-muted small mx-1" href="{:DcUrl($apply['module'].'/index/index','','')}">{$apply.name|DcHtml|DcSubstr=0,20,false}</a>
    {/volist}</h6>
    <form class="mb-3" action="{:DcUrl('tuchuang/index/index','','')}" method="get" data-toggle="form" data-callback="cdnUrl">
      <div class="input-group input-group-lg">
        <input class="form-control" type="text" name="url" id="url" placeholder="请输入待处理加速的图片地址" autocomplete="off" required>
        <div class="input-group-append">
          <button class="btn btn-primary" type="submit">加速</button>
        </div>
      </div>
    </form>
    <p class="alert alert-primary text-break mb-3 d-none" id="alert">loading...</p>
    <p class="lead mb-5">{:config('tuchuang.site_description')}</p>
</div>
<nav class="fixed-bottom text-center py-2 text-muted">
  Powerd by {:config("common.site_domain")}
  <a class="text-muted small" href="http://www.daicuo.net/store/{:DcConfig('common.site_applys.tuchuang.module')}" target="_blank">{:DcConfig('common.site_applys.tuchuang.name')} V {:DcConfig('common.site_applys.tuchuang.version')}</a>
  {if config("common.site_icp")}
  <a class="text-muted small" href="https://beian.miit.gov.cn/" target="_blank" rel="nofollow">{:config("common.site_icp")}</a>
  {/if}
</nav>
{/block}
{block name="js"}
<script>
var cdnUrl = function($json, $status, $xhr, $callBack){
    if($json.code == 1){
        $('#alert').removeClass('d-none').html($json.data);
    }else{
        $('#alert').removeClass('d-none').html($json.msg);
    }
}
</script>
{/block}